function [sumnoise]=beatflux

beatmat=rand(1,40);
mutemat=rand(1,40);
sumnoise=[];

for i=1:size(beatmat,2)
    sf=22050;
    %d=0.5;
    d=beatmat(i);
    n=ceil(sf*d);
    noise=rand(1,n);
    noise=noise/max(abs(noise));
    noise(ceil(size(noise,2)*mutemat(i)):size(noise,2))=0;
    sumnoise=[sumnoise noise];
    %sound(noise,sf);
    %waitsecs(mutemat(i));
end

end
